import request from '@/utils/request'
// 获取基础数据
export function getData(data) {
  return request({
    url: '/department/query',
    method: 'post',
    data
  })
}
//删除数据
export function delData(id) {
  return request({
    url: `/department/delete/${id}`,
    method: 'delete'
  })
}
//编辑数据----回显数据
export function getDepartmentDeatil(id) {
  return request({
    url: `/department/${id}`
  })
}
// 编辑发送请求
export function editDepartment(data) {
  return request({
    url: '/department/update',
    data
  })
}
// 获取所有部门
export function getDepartment() {
  return request({
    url: `/dictionary/dept`
  })
}

// 新增部门
export function addDepartment(data) {
  return request({
    url: '/department/save',
    method: 'post',
    data
  })
}
// 获取排序顺序
export function getSort() {
  return request({
    url: '/department/digit',
  })
}